﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Input.Touch;
using Microsoft.Xna.Framework.Media;

namespace DARE
{
#if !WINDOWS_PHONE
    public class CAudioMgr : IUpdateable
    {

        #region fields

        private CMusicMgr m_CMusicMgr;
        private CSoundMgr m_CSoundMgr;
        private bool m_updatable = true;

        #endregion

        #region properties

        public bool Updatable
        {
            get { return m_updatable; }
            set { m_updatable = value; }
        }

        public CMusicMgr MusicMgr 
        { 
            get { return m_CMusicMgr; }
        }

        public CSoundMgr SoundMgr
        {
            get { return m_CSoundMgr; }
        }

        #endregion

        #region ctor

        public CAudioMgr()
        { 
            CDare.Instance.UpdatableComponent.Add(this);
            m_CMusicMgr = new CMusicMgr();
            m_CSoundMgr = new CSoundMgr();
        }

        #endregion

        #region run

        public void Update(GameTime gameTime)
        {
            m_CMusicMgr.Update(gameTime);
            m_CSoundMgr.Update(gameTime);
        }

        #endregion

    }

#endif
}
